function timer(config, func) {
	config.runNow && func()
	let nowTime = new Date().getTime()
	let timePoints = config.time.split(':').map(i => parseInt(i))
	let recent = new Date().setHours(...timePoints)
	recent >= nowTime || (recent += 24 * 3600000)
	setTimeout(() => {
		func()
		setInterval(func, config.interval * 3600000)
	}, recent - nowTime)
}
module.exports = {
	timer
}
